using System;

namespace InfiniTec.Exchange.Notifications
{
	/// <summary>
	/// Contains information about a newly created subscription on an Exchange 2007 folder. Used by the <see cref="IExchangeWebServicesAdapter"/>.
	/// </summary>
	public sealed class SubscriptionInfo
	{
		/// <summary>
		/// Gets the subscription id.
		/// </summary>
		/// <value>The id.</value>
		public string Id { get; private set; }
		/// <summary>
		/// Gets the initial watermark.
		/// </summary>
		/// <value>The initial watermark.</value>
		public string InitialWatermark { get; private set; }

		/// <summary>
		/// Initializes a new instance of the <see cref="SubscriptionInfo"/> class.
		/// </summary>
		/// <param name="id">The id of the subscription.</param>
		/// <param name="initialWatermark">The initial watermark.</param>
		public SubscriptionInfo(string id, string initialWatermark)
		{
			if (string.IsNullOrEmpty(initialWatermark)) throw new ArgumentNullException("initialWatermark");
			if (string.IsNullOrEmpty(id)) throw new ArgumentNullException("id");

			Id = id;
			InitialWatermark = initialWatermark;
		}
	}
}